//
//  DetailedItemViewController.h
//  FMS
//
//  Created by Steven on 10/15/13.
//  Copyright (c) 2013 QGSVN. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "DetailedInfoViewController.h"
#import "AIPViewController.h"
#import "MaintenanceViewController.h"
#import "NotificationViewController.h"
#import "DocumentViewController.h"

enum {
    detailed_info_tab = 100,
    aip_tab,
    maintenance_tab,
    document_attachment_tab,
    notification_tab
};

@interface CircleView : UIView {
    
}
@end

@interface DetailedItemViewController : UIViewController {
    NSDictionary *dictLanguage;
    int itemType;
    int currentSelectedTab;
    DetailedInfoViewController *detailedInfoController;
    AIPViewController *aipController;
    MaintenanceViewController *maintenanceController;
    NotificationViewController *notificationController;
    DocumentViewController *documentController;
}
@property (unsafe_unretained) id parent;
@property (nonatomic, assign) int itemType;
@property (strong, nonatomic) IBOutlet UIImageView *leftBackground;
@property (strong, nonatomic) IBOutlet UIView *containerView;
@property (strong, nonatomic) IBOutlet UILabel *lbMainTitle;
@property (strong, nonatomic) IBOutlet UIButton *btnRightCorner;
@property (strong, nonatomic) IBOutlet UIButton *btnDetailedInfo;
@property (strong, nonatomic) IBOutlet UIButton *btnAIP;
@property (strong, nonatomic) IBOutlet UIButton *btnMaintenanceMgmt;
@property (strong, nonatomic) IBOutlet UIButton *btnDocumentAttachment;
@property (strong, nonatomic) IBOutlet UIButton *btnNotification;
@property (strong, nonatomic) NSMutableDictionary *itemDetailedDict;
@property (strong, nonatomic) DetailedInfoViewController *detailedInfoController;
@property (strong, nonatomic) MaintenanceViewController *maintenanceController;
@property (strong, nonatomic) CircleView *cirleNotification;
@property (strong, nonatomic) UILabel *lbNotification;
@property (assign) int numberUnreadNotification;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil itemType:(int)_itemType parent:(id)_parent;
- (IBAction)backPreviousView:(id)sender;
- (IBAction)tapRightCornerButton:(id)sender;
- (IBAction)handleMainAction:(UIButton *)sender;

- (void)refreshListSchedule;

- (void) confirmSelectType:(NSMutableDictionary*)dict;
- (void) selectDetailedMaintenance:(NSMutableDictionary*)dict;

- (void) confirmSelectMaintenance:(NSMutableDictionary*)_dict itemDetailedDict:(NSMutableDictionary*)_itemDetailedDict;

- (void) setNotificationAlert:(int)_numberUnreadNotification;
- (void) selectDetailedNotification:(NSMutableDictionary*)_dict;

- (void) selectDetailedDocument:(AsynImageButton*)sender;

@end
